package com.grantz.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.grantz.model.bbs.DiscussTypeModel;

@FeignClient(value = "bbs")
public interface DiscussTypeFegin {

	@PutMapping("/api/v1/discusstype")
	ResponseEntity<DiscussTypeModel>  save(@RequestBody DiscussTypeModel model);
	
	@PostMapping("/api/v1/discusstype")
	ResponseEntity<DiscussTypeModel>  update(@RequestBody DiscussTypeModel model);
	
	@GetMapping("/api/v1/discusstype/one")
	ResponseEntity<DiscussTypeModel>  getOne(@RequestParam("id")  String id);
	
	@GetMapping("/api/v1/discusstype/typeno")
	ResponseEntity<DiscussTypeModel>  getOneByTypeNo(@RequestParam("typeNo")  Long typeno);
}
